home *** CD-ROM | disk | FTP | other *** search
Wrap
property spriteNum, row, motion, location, fp, undercard global tableau, stock, equal, getlist, godlist, reserve, currentsel, dimpos, extras, points, foundation, mysuitb, mysuitt on beginSprite me row = determinerow() location = sprite(spriteNum).loc undercard = sprite(spriteNum - 4) tableau.addProp(row, new(script("card pile"))) end on determinerow me if spriteNum = 17 then return #one else if spriteNum = 18 then return #two else if spriteNum = 19 then return #thr else if spriteNum = 20 then return #fou end if end if end if end if end on mouseDown me if sprite(spriteNum).member <> member("empty", "playing cards") then puppetSound(3, member("pick card", "100GPak Generic SFX")) sprite(spriteNum).locZ = spriteNum + 1000 getlist = tableau[row] motion = timeout(string(spriteNum)).new(5, #moving, me) if tableau[row].getcardcount() > 1 then undercard.member = member(tableau[row].cards[tableau[row].getcardcount() - 1].membername, "playing cards") else undercard.member = member("empty", "playing cards") end if end if end on moving me if the mouseDown then sprite(spriteNum).loc = the mouseLoc else if the mouseUp then motion.forget() sprite(spriteNum).locZ = spriteNum abort() end if end if end on mouseUp me if equal then puppetSound(3, member("pick card", "100GPak Generic SFX")) sprite(currentsel).member = member(sprite(spriteNum).member.name, "playing cards") godlist.addCard(currentsel) tableau[row].cards.deleteOne(tableau[row].getlastcard()) sprite(spriteNum).member = member("empty", "playing cards") sprite(spriteNum).loc = location getlist = VOID godlist = VOID equal = 0 points = points + 10 checkwin() if foundation[sprite(currentsel).row].cards.count = 1 then if (sprite(currentsel).row = #fone) or (sprite(currentsel).row = #ftwo) or (sprite(currentsel).row = #fthree) or (sprite(currentsel).row = #ffour) then put "jello" mysuitb.add(foundation[sprite(currentsel).row].cards[1].suit) put mysuitb end if if (sprite(currentsel).row = #ffive) or (sprite(currentsel).row = #fsix) or (sprite(currentsel).row = #fseven) or (sprite(currentsel).row = #feight) then put "hello" mysuitt.add(foundation[sprite(currentsel).row].cards[1].suit) put mysuitt end if end if currentsel = 0 if tableau[row].getcardcount() = 0 then sprite(spriteNum).member = member("empty", "playing cards") else sprite(spriteNum).member = member(tableau[row].getlastcard().membername, "playing cards") end if else if not equal then puppetSound(3, member("drop card", "100GPak Generic SFX")) sprite(spriteNum).loc = location getlist = VOID end if end if if tableau[row].getcardcount() = 0 then sprite(fp - 1).member = member("empty", "playing cards") end if end